const fs = require("fs");
const path = require("path");

const filePath = path.join(__dirname,"/folders/test");
const parentPath = path.join(__dirname,"/folders");
if(!fs.existsSync(filePath)) {
    fs.mkdirSync(filePath);
}

const files = fs.readdirSync(parentPath);
console.log(files);

fs.rmdirSync(parentPath);